﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace CI.Caja.BE
{
   public class BE_Programacion
    {

       		#region Fields

		private string idTurno;
		private int idDia;
        private string txtNomDia;
        private string idPersonal;
        private int idPuntoVenta;
        private int idSede;
        private int idProgramacion;

        

        private BE_Dia dia;
        private BE_Turno turno;
        private BE_PuntoVenta ptoventa;
        private BE_Personal personal;

        public int IdProgramacion
        {
            get { return idProgramacion; }
            set { idProgramacion = value; }
        }
        public BE_Dia Dia
        {
            get { return dia; }
            set { dia = value; }
        }
        
        public BE_Turno Turno
        {
            get { return turno; }
            set { turno = value; }
        }
      
        public BE_PuntoVenta Ptoventa
        {
            get { return ptoventa; }
            set { ptoventa = value; }
        }
       

        public BE_Personal Personal
        {
            get { return personal; }
            set { personal = value; }
        }


        public int IdPuntoVenta
        {
            get { return idPuntoVenta; }
            set { idPuntoVenta = value; }
        }
        

        public int IdSede
        {
            get { return idSede; }
            set { idSede = value; }
        }
        public string TxtNomDia
        {
            get { return txtNomDia; }
            set { txtNomDia = value; }
        }

        private DateTime fecReg;

        public DateTime FecReg
        {
            get { return fecReg; }
            set { fecReg = value; }
        }
        private string fecInicio;
       //(19|20)\d\d([-/.])(0?[1-9]|1[012])\2(0?[1-9]|[12][0-9]|3[01])
       //[RegularExpression(@"(19|20)\d\d([-/.])(0?[1-9]|1[012])\2(0?[1-9]|[12][0-9]|3[01])", ErrorMessage =
       //             "El formato de fecha incorrecta ")]
       [Required(ErrorMessage = "La fecha de inicio es Obligatoria")]
        [RegularExpression(@"^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((19|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((19|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((19|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$", ErrorMessage =
                    "El formato de fecha incorrecta ")]
        public virtual string FecInicio
        {
            get { return fecInicio; }
            set { fecInicio = value; }
        }
        private string fecFin;
       //[RegularExpression(@"(19|20)\d\d([-/.])(0?[1-9]|1[012])\2(0?[1-9]|[12][0-9]|3[01])", ErrorMessage =
       //             "El formato de fecha incorrecta ")]
       [Required(ErrorMessage = "La fecha de fin es Obligatoria")]
       [RegularExpression(@"^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((19|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((19|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((19|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$", ErrorMessage =
                    "El formato de fecha incorrecta ")]
        public virtual string FecFin
        {
            get { return fecFin; }
            set { fecFin = value; }
        }
		

		#endregion

		#region Constructors

		/// <summary>
		/// Initializes a new instance of the Orden class.
		/// </summary>
		public BE_Programacion()
		{
            
            dia=new BE_Dia();
            turno=new BE_Turno();
            ptoventa=new BE_PuntoVenta();
            personal=new BE_Personal();
		}

		/// <summary>
		/// Initializes a new instance of the Orden class.
		/// </summary>
        public BE_Programacion(string turno, string idPersonal, int dia)
		{
            this.idTurno = turno;
            this.idPersonal = idPersonal;
            this.idDia = dia;
		}

		#endregion

		#region Properties
		/// <summary>
		/// Gets or sets the NroOrden value.
		/// </summary>
        public virtual string IdTurno
		{
            get { return idTurno; }
            set { idTurno = value; }
		}

		/// <summary>
		/// Gets or sets the IdPaciente value.
		/// </summary>
        public virtual string IdPersonal
		{
            get { return idPersonal; }
            set { idPersonal = value; }
		}

		/// <summary>
		/// Gets or sets the Descripcion value.
		/// </summary>
        public virtual int IdDia
		{
            get { return idDia; }
            set { idDia = value; }
		}

        public int Mes { get; set; }
        public int Anho { get; set; }
        public int Semana { get; set; }
		#endregion

    }
}
